#include <stdio.h>

// 函数原型，写在 main 上面
void function_1(void);

void function_2(int n, double x);

/**
 * 无返回值函数
 */
int main() {

	int m = 15;
	double y = 308.24;

	printf("The value of m in main is m = %d\n", m);

	// 调用函数
	function_1();
	function_2(m, y);

	printf("The value of m in main is still m = %d\n", m);

	printf("main m = %d, y = %lf\n", m, y);
}

void function_1(void) {
	printf("function_1\n");
}

void function_2(int n, double x) {

	int k = 2 * n + 2, m = 5 * n + 37;
	double z = 4.0 * x - 58.4;

	n = k + 1;
	x = x - 0.5;

	printf("function_2 k = %d, m = %d, z = %lf\n", k, m, z);
	printf("function_2 n = %d, x = %lf\n", n, x);
}